package com.hqyj.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Entity
@TableName("users")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Users extends BaseEntity{

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type= IdType.AUTO)
    private Integer uid; //主键

    private String username; //用户名

    private String mobile; //手机号码

    private String email; // 电子邮箱

    private String gender; //性别

    private String birthday; //生日

    private String password; //密码
    private String province; //省份
    //private String provinceCode; //省的编号


    private String city; //城市
    //private String cityCode; //城市的编号

    private String zone; //区
    //private String zoneCode; //地区的编号

    private String idCard; //身份证号码

    @Transient
    @TableField(exist = false)
    private String tokenName; //令牌的名字

    @Transient
    @TableField(exist = false)
    private String tokenValue; //令牌值；


    private String avatar; //阿凡达
}
